﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPage.aspx.cs" Inherits="TestPage" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script>
    <script type="text/javascript">
        function callService()
        {
            var _data = '<?xml version="1.0" encoding="utf-8"?>' +
                        '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
                        '<soap:Body>' +
                            '<SearchScanByName xmlns="http://tempuri.org/">' +
                                ' <clientId>11</clientId>' +
                                '<serviceId>24</serviceId>' +
                                ' <hashCode>jhgj</hashCode>' +
                                ' <searchString>test</searchString>' +
                                '</SearchScanByName>' +
                            '</soap:Body>' +
                        '</soap:Envelope>';
            // alert(_data);
            $.ajax({
                type: "POST",
                url: "http://ssica.org/services/Services.asmx?op=SearchScanByName",
                data: _data,
                contentType: "text/xml;charset-uf8",
                dataType: "xml",
                success: function (msg) {
                    var result = $("SearchScanByNameResult", msg);
                    var res = $(result).text();
                     alert(res);  
                }
                });

        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <input type="button" onclick="javascript:callService();" value="ClickMe" />
    </div>
    </form>
</body>
</html>
